home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
YERK
/
SUPPLEME
/
UNSUPPOR
/
OPTIONAL
/
TASKS
< prev
Wrap
Text File
|
1986-09-30
|
719b
|
33 lines
\ add background tasks to Neon
\ 9/29/86 cdn Updated for v2.0 -added curTask & delay
Decimal
0 value delay
0 value nullcnt
0 value curTask
\ the taskList is a queue of background tasks that will be
\ executed whenever there is a null event.
4 Ordered-Col taskList \ up to 4 background tasks
\ add cfa to the task list
: addTask
add: taskList ;
\ remove cfa from the task list
: killTask
indexof: taskList 0= ?error 152
remove: tasklist
curTask size: taskList min -> curTask ;
\ execute the tasks round-robin
: doTask size: taskList 0= IF exit THEN
nullcnt
IF -1 ++> nullcnt exit
ELSE delay -> nullcnt THEN
curTask 1+ size: taskList mod
dup -> curTask
exec: taskList ;
'c doTask setIdle: fWind